package com.maimeng.Services;


public class RedisCache implements ICache {
    private String ip;
    private String port;
    private int timeout=60;
    public RedisCache(String ip, String port) {
        this.ip = ip;
        this.port = port;
    }
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public String getCache(String key) {
         return "获得redis缓存,key是"+key+"IP和端口是"+
                this.getIp()+":"+this.getPort()+"超时时间是"+this.getTimeout();
    }

}
